<template>
    <div class="lang">
        <el-radio-group v-model="language" size="small" @change="changeLang">
            <el-radio-button label="zh-CN">中文</el-radio-button>
            <el-radio-button label="en-US">English</el-radio-button>
        </el-radio-group>
    </div>
</template>
<style scoped>
    .footer{display: flex;height:100px;justify-content: center;align-items: center;color:#909399;}
</style>
<script>
export default {
    data(){
        return {
            language:this.$i18n.locale,
        }
    },
    methods:{
        changeLang(val){
            this.$i18n.locale = val;
            sessionStorage.setItem('lang', val);
            this.$emit('changeLang',val);
        }
    }
}
</script>